eSpeak - Channel Report/Post-processing command

Description

The eSpeak Channel Report/Post-processing command transforms a SSML formated XML file, generated by Awasu, into an spoken word audio file in .MP3 format.

Caveat: The post-processing creates a .WAV file that can be HUGE compared to the SSML amd MP3 files. It is suggested below that you increase the Timeout parameter of the Post-processing command to 300 (the maximum value) to allow the process to complete, and you do not routinely keep the intermediate files such as the .WAV file.

As an example, starting with an SSML file of 14 KB, the WAV file can balloon up to 20,068 KB, while the MP3 file is much smaller at 1,821 KB.

Version Infomation

Version 1.0, Updated April, 15, 2011 by kevotheclone
For support post a message to Awasu's forums.

Software Dependencies

  1. Microsoft Visual C++ 2008 SP1 Redistributable Package The Microsoft Visual C++ 2008 SP1 Redistributable Package is a free library of runtime components required by the eSpeak_post_process.exe file. You can download the Microsoft Visual C++ 2008 SP1 Redistributable Package here.
    If the Microsoft Visual C++ 2008 SP1 Redistributable Package is not installed then the eSpeak_post_process.exe file will not even run and the eSpeak_post_process_error.log file will not even be created.

    So as a test to see if the Microsoft Visual C++ 2008 SP1 Redistributable Package is already install you can simply run the eSpeak_post_process.exe file without any command line arguments.

    If the Microsoft Visual C++ 2008 SP1 Redistributable Package is installed you'll see that the eSpeak_post_process_error.log file will be created conaining an error message similar to this:
    Error: Channel Report path not specified. Enter "-r {%REPORT-FILENAME%}" in the "Command" field of Awasu's "Run post-processing command".
  2. eSpeak eSpeak is free, open-source text-to-speech software. You can download eSpeak here, or more specifically here.
  3. Lame Lame is a free, open-source MP3 encoded. You can download LAME here.

Installation

Install eSpeak Channel Report/Post-processing command

Unzip the files in the dist directory to a directory on your hard drive.
I created a ReportPostProcessing\eSpeak folder off of my {Awasu Install Directory} directory, but any directory will work.

You can safely separate the eSpeak_SSML.template file from the eSpeak_post_process.exe file. Maybe you want to keep all of your Channel Reports templates in your {Awasu Install Directory}\Resources\Report Templates directory, feel free to move it there.

Install eSpeak

It's pretty straightforward, unzip and run the setup_espeak.exe file from the downloaded ZIP file to install eSpeak on your PC. The eSpeak post-processing command will find the installed location from the Windows Registry.

Install Lame

Unzip the lame.exe file into the same directory where you installed the eSpeak_post_process.exe file, otherwise you can unzip the lame.exe file anywhere you want as long as you correctly specify the location using the "-l" parameter as specified in the Parameters section below.

Configuration

Channel Report configuration

  1. Create a Channel Report, select the eSpeakSSML.template in the Template file field.

    For your intial testing, you might want use these tips to limit the amount of data you are procesing. Once you get an idea of how long it takes, and how big a file it produces you can adjust the settings back to a more "normal" setting.

    • Select a limited number of feeds or a Workpad that doesn't contain a large number of items.
    • Set the Feed content setting to Excerpt to limit the amount of data that you are processing.
    • Limit the Channel Report to include New Items only.

  2. For the Feed content section select either Excerpt or Plain text. Depending upon the feed item, selecting Full content may add malformed HTML to the SSML file which may cause the post-processing command to fail.
  3. In the Run post-processing command field, enter the path to the eSpeak_post_process.exe program and be sure to add the "-r {%REPORT-FILENAME%}" parameter.
  4. You'll probably need to increase the value of the Timeout field, I've set mine to "300".
  5. Specify other, optional parameters as outlined below.

Post-processing Command Parameters

Short name Long name Description Required Default Value
-r --channel_report Channel Report Path Yes N/A, it's required.
-o --output_path

The path to the .MP3 file.

Specify this if you want the file in a different directory than the Channel Report and .WAV files.

No The directory where where the SSML file is created, as specified by the manadatory "-r" parameter.
-k --keep_intermediate_files

True

Keeps the intermediate files, (Channel Report & .WAV files).

Maybe be useful while debugging or editing the eSpeakSSML.template file.

No False
-e --espeak_options

espeak.exe options

The -f and -m options are actually required and will be supplied by eSpeak_post_process.exe program so there is no need for you to specify them.

See the included eSpeak-help.txt for the complete list of options.

No "-k20 -m -f"
-l --lame_path

The path to lame.exe

Specify only if you want to keep

lame.exe

in a folder other that where the eSpeak_post_process.exe file resides.

No Defaults to the same location as the eSpeak_post_process.exe file.
-p --lame_options

lame.exe options

See lame-help.txt for the complete list of options.

No -h

Customizing the Channel Report

eSpeak comes with 7 "male" voices and 4 "female" voices, by default I used male voice #7 and female voice #1 in the eSpeak_SSML.template file.

You can easliy change this by editing the eSpeak_SSML.template file in a text editor. Simply find gender="male" or gender="female" attributes and change the gender as desired. Also, adjacent to the "gender" attributes are "variant" that specify the voice number within the gender.

Errors

In the event of a post-processing command error, the following error codes will be returned and displayed in Awasu.

The least error number and message will also be written to the eSpeak_post_process_error.log file in the same directory as the eSpeak_post_process.exe file.

Return code Description
1

Channel Report path not specified.

Add "-r {%REPORT-FILENAME%}" to the "Command" field of Awasu's "Run post-processing command", following the path to the eSpeak_post_process.exe file.
See, "Post-processing Command Parameters", above.

2

eSpeak is not installed.

Download and install eSpeak from as specified above.

3 Error converting Channel Report file to a .WAV file. The specific error number an description will be provided in the error message.
4

Error running lame.exe.

This could occur when you pass invalid, custom options to lame.exe via the -p parameter.
See, "Post-processing Command Parameters", above.

5 Error converting .WAV file to a .MP3 file. The specific error number an description will be provided in the error message.
6 A file path passed to eSpeak_post_process.exe was invalid, this usually occurs when you use the -l parameter and pass an invalid path to lame.exe
See, "Post-processing Command Parameters", above.
7 Any other error not specifically mentioned above.

License

This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any commercial or non-commercial purpose and to alter it and redistribute it freely, subject to the following restrictions: